package org.smile.homework01.kevin.DockerYard;

public class ShipY extends Ships{
    public GPS InstallGPS(String orderType) {
        GPS gps = null;
        if ("华为".equals(orderType)) {
            gps = new GPS(orderType);
            gps.install(orderType);
        }
        if ("百度".equals(orderType)) {
            gps = new GPS(orderType);
            gps.install(orderType);
        }
        if ("高德".equals(orderType)) {
            gps = new GPS(orderType);
            gps.install(orderType);
        }
        return null;
    }

    //照明设备厂商
    public Lighting InstallLighting(String orderType) {
        Lighting lighting = null;
        if ("佛山".equals(orderType)) {
            lighting = new Lighting(orderType);
            lighting.install(orderType);
        }
        if ("广州".equals(orderType)) {
            lighting = new Lighting(orderType);
            lighting.install(orderType);
        }
        if ("珠江".equals(orderType)) {
            lighting = new Lighting(orderType);
            lighting.install(orderType);
        }
        return null;
    }

    //通讯设备厂商
    public Communication InstallCommunication(String orderType) {
        Communication communication = null;
        if ("欧标".equals(orderType)) {
            communication = new Communication(orderType);
            communication.install(orderType);
        }
        if ("暴风".equals(orderType)) {
            communication = new Communication(orderType);
            communication.install(orderType);
        }
        return null;
    }

    @Override
    public void install() {
//        System.out.println(this.getClass().getName() + "所有设备已安装完成");
        component.install( "导航");
    }
}
